package com.yunhe.day322.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yunhe.day322.domain.SysLog;
import com.yunhe.day322.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
@RequestMapping("syslog")
public class SyslogController {
    @Autowired
    private SysLogService sysLogService;

//    /**
//     * 分页查询所有用户日志信息
//     * @param page
//     * @param size
//     * @param model
//     * @return
//     */
//    @RequestMapping("/findAll")
//    public String findAll(@RequestParam(value = "page", defaultValue = "1") Integer page ,
//                          @RequestParam(value = "size",defaultValue = "5") Integer size,
//                          Model model){
//        PageHelper.startPage(page,size);
//        List<SysLog> list = sysLogService.findAll();
//        PageInfo pageInfo = new PageInfo(list);
//        model.addAttribute("pageInfo",pageInfo);
//        return "syslog-list";
//    }

}
